﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for News
/// </summary>
public class News : BaseBAL
{
    private int id ;
    private string title;
    private string thumbnail;
    private string content;
    private string description;
    private int createdUserId;
    private DateTime createdTime;
    private int groupNewsId;
    private DateTime modifiedTime;
    private int status;
    private string groupNewsName;
    private int isActive;

    public int Id { get { return id; } set { id = value; } }
    public string Title { get { return title; } set { title = value; } }
    public string Thumbnail { get { return thumbnail; } set { thumbnail = value; } }
    public string Content { get { return content; } set { content = value; } }
    public string Description { get { return description; } set { description = value; } }
    public int CreatedUserId { get { return createdUserId; } set { createdUserId = value; } }
    public DateTime CreatedTime { get { return createdTime; } set { createdTime = value; } }
    public int GroupNewsId { get { return groupNewsId; } set { groupNewsId = value; } }
    public DateTime ModifiedTime { get { return modifiedTime; } set { modifiedTime = value; } }
    public int Status { get { return status; } set { status = value; } }
    public int IsActive { get { return isActive; } set { isActive = value; } }

    public string GroupNewsName { get { return groupNewsName; } set { groupNewsName = value; } }

    private CNewsFacade facade = new CNewsFacade();
    public News Detail(int brandid)
    {
        return facade.Detail(brandid);
    }
    public IList<News> List(int pageIndex, int pageMax, int groupnewsid, int isActive)
    {
        return facade.List(pageIndex, pageMax, groupnewsid, isActive);
    }
    public News Update(int newsid, string title, string thumbnail, string content, string description, int groupNewsId, int status, int isActive)
    {
        return facade.Update(newsid, title, thumbnail, content, description, groupNewsId, status, isActive);
    }
    public News Insert(string title, string thumbnail, string content, string description, int userid, int groupNewsId, int status, int isActive)
    {
        return facade.Insert(title, thumbnail, content, description, userid, groupNewsId, status, isActive);
    }
    public News UpdateStatusActive(int id, int _isActive)
    {
        return facade.UpdateStatusActive(id, _isActive);
    }
}